package com.sikaryofficial.system.api.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author : qinjinyuan
 * @desc : nickName
 * @date : 2023/11/18 13:02
 */
@Getter
@Setter
@ToString
@ApiModel(value = "nickName请求对象", description = "nickName请求对象")
public class SysUserNickNameReq implements Serializable {
    /**
     * nickName
     */
    @ApiModelProperty(value = "nickName")
    @NotBlank(message = "Nick name is empty")
    @Length(max = 20, message = "Nick name cannot be greater than 20 chars")
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_\\s]*$", message = "Nick name must start with a letter and can only be letters, numbers, and a hyphen")
    private String nickName;
}
